package VUTHANHPHUC_HOMEWORK_OOP;

import java.lang.invoke.SwitchPoint;

public class CaculatorModels {
	public double Caculator(Caculator objCal) {
		double result = 0;
		switch (objCal.getOpt()) {
		case "Cộng":
			result = objCal.getA() + objCal.getB();
			break;
		case "Trừ":
			result = objCal.getA() - objCal.getB();
			break;
		case "Nhân":
			result = objCal.getA() * objCal.getB();
			break;
		case "Chia":
			result = objCal.getA() / objCal.getB();
			break;
		}
		return result;
	}
}
